import request from "@/utils/request"

export function list (obj) {
  return request({
    url: "/JobFtp/queryList",
    method: "post",
    params: obj
  })
}

export function add (obj) {
  return request({
    url: "/JobFtp/addJob",
    method: "get",
    data: obj
  })
}

export function update (obj) {
  return request({
    url: "/JobFtp/savePage",
    method: "post",
    data: obj
  })
}

export function enable (obj) {
  return request({
    url: "/JobFtp/enable",
    method: "get",
    data: obj
  })
}
export function triggerTask (obj) {
  return request({
    url: "/JobFtp/triggerTask",
    method: "get",
    data: obj
  })
}

export function config (obj) {
  return request({
    url: "/JobFtp/submitPage",
    method: "post",
    data: obj
  })
}
export function notNowSavePage (obj) {
  return request({
    url: "/JobFtp/notNowSavePage",
    method: "post",
    data: obj
  })
}
export function del (obj) {
  return request({
    url: "/JobFtp/deletePage",
    method: "get",
    data: obj
  })
}

// export function jobDeal(obj) {
//   return request({
//     url: "/interfaceDataCollectJobConfig/jobDeal",
//     method: "get",
//     params: obj
//   })
// }

export function query (obj) {
  return request({
    url: "/JobFtp/queryPage/",
    method: "get",
    data: obj
  })
}


export function call (obj) {
  return request({
    url: "/jobInterfaceDatasource/interface/call/" + obj.id,
    method: "get"
    // params: obj
  })
}
export function browsingFiles (obj) {
  return request({
    url: "/JobFtpDatasoutce/visitFile",
    method: "get",
    data: obj
  })
}
